<?php
error_reporting(0);
$url = $_POST['url'];
ini_set("allow_url_fopen", 1);
$data = array();    
while(list($n,$v) = each($_POST)){$data[] = "$n=$v";}    
$data = implode('&', $data);
$url = parse_url($url);
$host = $url['host'];
$path = $url['path'];
$port = 80;
$data_length = strlen($data);
$header  = "POST $path HTTP/1.0\r\n";
$header .= "Host: $host\r\n";
$header .= "User-Agent: DoCoMo/1.0/P503i\r\n";
$header .= "Content-type: application/x-www-form-urlencoded\r\n";
$header .= "Content-length: $data_length\r\n";
$header .= "\r\n";
$fp = fsockopen($host,$port,$err_num,$err_msg,120);
$response ='';
fputs($fp, $header . $data);
while(trim(fgets($fp,4096)) != '');//Retira o cabecalho HTTP
while(!feof($fp)){$response .= fgets($fp,4096);}
// close the socket connection:
fclose($fp);
echo $response;
?>